#pragma once

#include <iostream>
#include <vtkm/cont/DataSet.h>
#include <vtkm/cont/DataSetBuilderExplicit.h>
#include <vector>

using Real = vtkm::FloatDefault;
using Point = vtkm::Vec<Real, 3>;
using Id = vtkm::Id;

size_t testArraySize()
{
	vtkm::cont::ArrayHandle<double> a;
	return a.GetNumberOfValues();
}

vtkm::cont::DataSet testDataSet()
{
	std::vector<Point> points = {
		{0,0,0},
		{1,0,0},
		{1,1,0},
		{0,1,0}
	};

	std::vector<vtkm::UInt8> shapes;
	std::vector<Id> indices;
	std::vector<Id> conn;

	shapes.push_back(vtkm::CellShapeIdEnum::CELL_SHAPE_TRIANGLE);
	indices.push_back(3);
	conn.push_back(0);
	conn.push_back(1);
	conn.push_back(2);

	shapes.push_back(vtkm::CellShapeIdEnum::CELL_SHAPE_TRIANGLE);
	indices.push_back(3);
	conn.push_back(0);
	conn.push_back(2);
	conn.push_back(3);

	vtkm::cont::DataSetBuilderExplicit builder;
	vtkm::cont::DataSet data_set = builder.Create(points, shapes, indices, conn, "points", "cells");
	return data_set;
}